package Form;

import javax.swing.BorderFactory;
import javax.swing.JPanel;

import java.awt.Color;
import java.awt.GridLayout;

import Control.Shop_AdministrateOrder_Controller;
import javax.swing.JScrollPane;

@SuppressWarnings("serial")
public class Shop_AdministrateOrders_Form extends JPanel {
	
	private Main parser;
	private Shop_AdministrateOrder_Controller control;
	private JScrollPane ordersPane;
	
	public Main getParser() {
		return parser;
	}

	public void setParser(Main parser) {
		this.parser = parser;
	}

	public Shop_AdministrateOrder_Controller getControl() {
		return control;
	}

	public void setControl(Shop_AdministrateOrder_Controller control) {
		this.control = control;
	}

	public Shop_AdministrateOrders_Form(Main parser) {
		setParser(parser);
		
		setLayout(new GridLayout(1, 1, 0, 0));
		add(getOrdersPane());
	}
	public JScrollPane getOrdersPane() {
		if (ordersPane == null) {
			ordersPane = new JScrollPane();
			ordersPane.setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY, 3));
			setControl(new Shop_AdministrateOrder_Controller(this));
		}
		return ordersPane;
	}
	
	public void setOrdersPane(JScrollPane pane) {
		ordersPane = pane;
	}
	
}
